<?php
class ShopModel extends Model {
    protected $_table = 'shop';
    
    public function getRecent10Shops(){
        $q = "SELECT *
                FROM $this->shopTable
                ORDER BY id DESC
                LIMIT 10";
        return $this->fetchAll($q);
    }
    
    public function addShop($value){
        $this->insert($value);
        return $this->getPDO()->lastInsertId();
    }
}
?>